The requirement for a final else
clause is defensive programming. The clause should either take appropriate action, or contain a
suitable comment as to why no action is taken.
Noncompliant code example
case param
when 1
do_something()
when 2
do_something_else()
end
Compliant solution
case param
when 1
do_something()
when 2
do_something_else()
else
handle_error('error_message')
end